package com.zzw.thread.safe;

/**
 * @author zzw
 * @see
 * @since 2018/3/30
 */
public class SyncCounter implements Counter {

    private long counter = 0;

    @Override
    public synchronized  void increment() {
        counter++;
    }

    @Override
    public long getCounter() {
        return counter;
    }
}
